package com.endpoint.controller;

import org.springframework.boot.actuate.endpoint.annotation.DeleteOperation;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.boot.actuate.endpoint.annotation.WriteOperation;

/**
 * Endpoint == WebEndpoint + JmxEndpoint
 * 两种方式都支持
 */
@Endpoint(id = "endpointCustom")
public class EndpointCustom {

    @ReadOperation
    public String endpointCustomRead(String content) {
        return "你请求的内容: " + content;
    }

    @WriteOperation
    public String endpointCustomWrite(String content) {
        return "你写的内容: " + content;
    }

    @DeleteOperation
    public String endpointCustomDelete(String content) {
        return "你删除的内容: " + content;
    }
}